﻿<Window x:Class="WPFDemo.addContactUri"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:custom="clr-namespace:WPFDemo"
        Title="連絡先追加/削除" Height="350" Width="350" Loaded="Window_Loaded_1">
    <Window.Resources>
        <DataTemplate x:Key="ContactInfoTemplate" DataType="WPFDemo.ContactInfo">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="{Binding DisplayName}" Margin="3"/>
            </Grid>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="AddContactButton" Content="+" HorizontalAlignment="Left" Margin="296,11,0,0" 
    		    VerticalAlignment="Top" Width="17" Click="AddContactButton_Click" Height="20"/>

            <Button x:Name="RemoveContactButton" Content="-" HorizontalAlignment="Left"  Height="20"
    		    Margin="317,11,0,0" VerticalAlignment="Top" Width="17" Click="RemoveContactButton_Click"/>
            <TextBlock HorizontalAlignment="Left" Margin="7,13,0,0" TextWrapping="Wrap" Text="接続先Sip Uri:" VerticalAlignment="Top" Width="75"/>
            <TextBox x:Name="ContactSipUriTextBox" HorizontalAlignment="Left" Height="23" Margin="97,11,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="191"/>
        </Grid>
            <TextBlock Text="Other Contacts Group:" Margin="5,47,4.333,250.667" />
        <ListBox  x:Name="otherContactsListBox" Margin="4,72,3.333,3.667" ItemsSource="{Binding OtherContacts}" ItemTemplate="{StaticResource ContactInfoTemplate}"  VerticalAlignment="Stretch" SelectionChanged="otherContactsListBox_SelectionChanged" />

    </Grid>
</Window>
